<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <!-- 引入JSTL标签库，c表示标签库别名，可以任意命名，一般而言用c -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>index</title>
</head>
<body>
    <c:set var="sex" value="女" scope="page"></c:set> <!-- scope指定作用域，page/request/session/application -->
    <c:if test="${sex == '男' }">
        Hello, ${sex}
    </c:if>
    <c:if test="${sex != '男' }">
        Hi, girl
    </c:if>
</body>
</html>